From: Giovanni Campagna Date: Tue, 29 Mar 2011 12:29:26 +0000 (+0200) Subject: NetworkMenu: fixup device descriptions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8352 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b2b685e46d489f101b94f1ad23c0794804c274fc;p=gnome-shell.git NetworkMenu: fixup device descriptions Fix some bugs in Util.fixupPCIDescription(), that caused all device descriptions to be empty. https://bugzilla.gnome.org/show_bug.cgi?id=646074 --- diff --git a/js/misc/util.js b/js/misc/util.js index e22811716..2d9cef264 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -150,7 +150,7 @@ const _IGNORED_WORDS = [ 'Incorporated', 'Ltd.', 'Limited.', - 'Intel?', + 'Intel', 'chipset', 'adapter', '[hex]', @@ -181,7 +181,7 @@ const _IGNORED_PHRASES = [ ]; function fixupPCIDescription(desc) { - desc.replace(/[_,]/, ' '); + desc = desc.replace(/[_,]/, ' '); /* Attempt to shorten ID by ignoring certain phrases */ for (let i = 0; i < _IGNORED_PHRASES.length; i++) { @@ -197,7 +197,7 @@ function fixupPCIDescription(desc) { /* Attmept to shorten ID by ignoring certain individual words */ let words = desc.split(' '); let out = [ ]; - for (let i = 0; i < words; i++) { + for (let i = 0; i < words.length; i++) { let item = words[i]; // skip empty items (that come out from consecutive spaces)